Part Number Hot Search : 
3236T A6006 49LF160C STK5332 XF001 SQZ300 62351 SQZ300
Product Description
Full Text Search
 

To Download EM78P451SP Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  em78p451s 8-bit microcontroller with otp rom product specification d oc . v ersion 1.0 elan microelectronics corp. june 2004
trademark acknowledgments: ibm is a registered trademark and ps/2 is a trademark of ibm. windows is a trademark of microsoft corporation. elan and elan logo are trademarks of elan microelectronics corporation. copyright ? 2005 by elan microelectronics corporation all rights reserved printed in taiwan the contents of this specification are subject to change without further notice. elan microelectronics assumes no responsibility concerning the accuracy, ade quacy, or completeness of this specifi cation. elan microelectronics makes no commitment to update, or to keep current the information and material contained in this specification. such information and material may change to conform to each confirmed order. in no event shall elan microelectronics be made responsible for any claims attributed to errors, omissions, or other inaccuracies in the information or material contained in this specification. elan microelectronics shall not be liable for direct, indirect, special incidental, or consequential damages arising from the use of such information or material. the software (if any) described in this specification is furn ished under a license or nondisclosure agreement, and may be used or copied only in accordance with the terms of such agreement. elan microelectronics products are not intended for use in life support appliances, devices, or systems. use of elan microelectronics product in such applications is not supported and is prohibited. no part of this specification may be reproduc ed or transmitted in any form or by any means without the expressed written permission of elan microelectronics. elan microelectronics corporation headquarters: no. 12, innovation road 1 hsinchu science park hsinchu, taiwan 30077 tel : +886 3 563-9977 fax : +886 3 563-9966 http : //www.emc.com.tw hong kong: elan (hk) microelectronics corporation, ltd. rm. 1005b, 10/f empire centre 68 mody road, tsimshatsui kowloon , hong kong tel : +852 2723-3376 fax : +852 2723-7780 elanhk@emc.com.hk usa: elan information technology group 1821 saratoga ave., suite 250 saratoga, ca 95070 usa tel : +1 408 366-8223 fax : +1 408 366-8220 europe: elan microelectronics corp. (europe) siewerdtstrasse 105 8050 zurich, switzerland tel : +41 43 299-4060 fax : +41 43 299-4079 http : //www.elan-europe.com shenzhen: elan microelectronics shenzhen, ltd. ssmec bldg., 3f, gaoxin s. ave. shenzhen hi-tech industrial park shenzhen, guandong, china tel : +86 755 2601-0565 fax : +86 755 2601-0500 shanghai: elan microelectronics shanghai corporation, ltd. 23/bldg. #115 lane 572, bibo road zhangjiang hi-tech park shanghai, china tel : +86 021 5080-3866 fax : +86 021 5080-4600
contents product specification (v1.0) 06.01.2004 ? iii contents 1 general description................................................................................................... 1 2 features..................................................................................................................... ...... 1 3 pin assignment ............................................................................................................... 2 4 function description.................................................................................................. 4 4.1 operational registers ..................................................................................................4 4.1.1 r0 (indirect a ddress regi ster) ...................................................................................... 4 4.1.2 r1 (tcc) ................................................................................................................. ...... 4 4.1.3 r2 (program co unter) & stack...................................................................................... 4 4.1.4 r3 (statu s register) ..................................................................................................... .6 4.1.5 r4 (ram sele ct register) ............................................................................................. 6 4.1.6 r5~r8 (por t 5 ~ port8).................................................................................................. 7 4.1.7 r9 (port9) ............................................................................................................... ....... 7 4.1.8 ra (spirb: spi read buff er)........................................................................................ 8 4.1.9 rb (spiwb: spi write bu ffer)....................................................................................... 8 4.1.10 rc (spis: spi st atus segi ster)..................................................................................... 8 4.1.11 rd (spic: spi control regi ster)................................................................................... 9 4.1.12 re (tmr1: ti mer1 register) ........................................................................................ 10 4.1.13 rf (pwp: pulse widt h preset r egister)........................................................................ 10 4.1.14 r20~r3e (general purpose regi ster)........................................................................ 10 4.1.15 r3f (interrupt status regi ster) ................................................................................... 10 4.2 special purpose registers .........................................................................................10 4.2.1 a (acc umulat or) .......................................................................................................... . 10 4.2.2 cont (contro l register) ............................................................................................. 11 4.2.3 ioc5 ~ ioc9 (i/o po rt control r egister)..................................................................... 11 4.2.4 iocc (t1con: timer1 control regi ster) ...................................................................... 11 4.2.5 iocd (pull-high co ntrol regi ster) ............................................................................... 12 4.2.6 ioce (wdt c ontrol regi ster) ..................................................................................... 12 4.2.7 iocf (interrupt mask register) ................................................................................... 13 4.3 tcc/wdt presacler ..................................................................................................14 4.4 i/o ports .................................................................................................................. ...15 4.5 serial peripheral interface mode..............................................................17 4.5.1 overview & features ................................................................................................... 17 4.5.2 spi function description ............................................................................................. 19 4.5.3 spi signal & pin descrip tion ....................................................................................... 20 4.5.4 programmed the re lated regi sters............................................................................... 22 4.5.5 spi m ode timi ng ......................................................................................................... 2 4 4.5.6 software app lication of spi ......................................................................................... 25 4.6 timer 1 .................................................................................................................... ...30 4.6.1 ov erview................................................................................................................. ..... 30 4.6.2 function description .................................................................................................... 3 0
contents iv ? product specification (v1.0) 06.01.2004 4.6.3 programmed the re lated regi sters............................................................................... 30 4.7 reset and wake-up .................................................................................................31 4.8 interrupt.................................................................................................................. ....37 4.9 oscillator ................................................................................................................. ...38 4.9.1 oscilla tor mo des......................................................................................................... . 38 4.9.2 crystal oscillator/cer amic resonators (xtal) ........................................................... 38 4.9.3 rc oscilla tor m ode ..................................................................................................... 40 4.10 code option register.................................................................................................41 4.11 instruction set ........................................................................................................... .42 4.12 timing diagrams ........................................................................................................45 5 absolute maximum rating ....................................................................................... 46 6 electrical characteristics.................................................................................. 46 6.1 dc characteristic .......................................................................................................46 6.2 ac characteristic .......................................................................................................47 7 application circuit .......................................................................................................... .. 48 appendix a package types ................................................................................................................ .. 49 b package information......................................................................................................... 4 9 specification revision history doc. version revision description date 1.0 initial version 06/01/2004
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 1 (this specification is subject to change without further notice) 1 general description the em78p451s is an 8-bit microproce ssor designed and developed with low-power, high speed cmos technology. its operational kernel is implemented with risc-like architecture and is available in the mask rom version. the one time programmable (otp) version is flexible, both in mass production or engineering test stages. otp provide users with unlimited volume with fa vorable price opportuniti es. this device is equipped with the serial peripheral interface (spi) function. the em78p451s is very suitable for wired communication. only 58 easy-to-learn instructions are needed and user?s program can be emulated with emc in-circuit emulator (ice). 2 features operating voltage range: 2.3v~5.5v. operating temperature range: 0 c~70 c. operating frequency range (base on 2 clocks ): ? crystal mode: dc~20mhz at 5v, dc~ 8mhz at 3v, dc~4mhz at 2.3v. ? rc mode: dc~4mhz at 5v, dc~4mhz at 3v, dc~4mhz at 2.3v. low power consumption: ? less then 3 ma at 5v/4mhz ? typically 10 a during sleep mode serial peripheral interface (spi) available. 4k 13 bits on chip rom (em78p451s). 11 special function registers. 140 8 bits on chip general-purposed registers. 5 bi-directional i/o ports (35 i/o pins). 3 led direct sinking pins with internal serial resistors. built-in rc oscillator with external serial resistor, 10% variation. built-in power-on reset. 5 stacks for subroutine nesting. 8-bit real time clock/counter (tcc) with overflow interrupt. two machine clocks or four machine clocks per instruction cycle. power down mode. programmable wake up from sleep circuit on i/o ports. programmable free running on-chip watchdog timer.
em78p451s 8-bit microcontroller with otp rom 2 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 12 wake-up pins. 2 open-drain pins. 2 r-option pins. 32 programmable pull-high input pins. packages: ? 40 pin dip 600mil : EM78P451SP . ? 40 pin sop 450mil : em78p451swm ? 44 pin qfp : em78p451saq. four types of interrupts. ? external interrupt (/int). ? spi transmission completed interrupt. ? tcc overflow interrupt. ? timer1 comparator match interrupt. 3 pin assignment vdd vss /int p50 p51 p53 p60 p61 p62 p63 p64 p52 p70//reset r-osci osco p87 p65 p72 p71 p67 p66 p86 EM78P451SP 1 2 3 4 5 6 7 8 9 10 11 12 14 13 26 25 24 23 22 21 20 19 18 17 29 30 27 28 p55 p54 p56 p57 15 16 31 32 p80 p81 p91 clk data p94/sck p95//ss p93/sdo p92/sdi p85 p84 p83 p82 38 37 36 35 34 33 39 40 p90 em78p451aq p90 1234567 8 9 10 11 12 14 13 20 19 18 17 15 16 33 32 31 30 29 28 27 26 25 24 23 22 21 44 42 43 36 37 38 39 41 40 34 35 p91 p92/sdi p93/sdo p50 p51 p53 p52 p55 p54 p56 p57 p80 p81 p94/sck p95//ss vdd p60 p61 p62 p63 p64 p70//reset r-osci osco p87 p65 p72 p71 p67 p66 p86 p85 p84 p83 p82 nc nc nc nc vss /int clk data fig. 1 pin assignment
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 3 (this specification is subject to change without further notice) table 1 pin description symbol pin no. type function description r-osci 39 i in xtal mode: crystal input; in in ternal c, external r mode: 56kohm 5% pull high for 1.8432mhz. osco 40 o in xtal mode: crystal output; in rc mode: instruction clock output. p90~p95 5~10 i/o general bi-directional i/o port. all of its pins can be pulled-high by software. p90 and p91 are pin-change wake up pins. p80~p87 19~26 i/o general bi-directional i/o port. all of its pins can be pulled-high by software. p80 and p81 are also used as the r-option pins. p70~p72 37~35 i/o led direct-driving pin with internal se rial resistor used as output and is software defined. p70/ reset 37 i/o led direct-driving pin with internal se rial resistor used as output and is software defined. code option bit 3 (ren): reset enable ren=0 => for reset pin ren=1 => for general purpose i/o (p70) internal pull high resistor 220kohm clk 4 i/o by connecting p74 and p76 together. p74 can be pulled-high by software and it is also a pin-change wake up pin. p76 can be defined as an open-drain output. data 3 i/o by connecting p75 and p77 together. p75 can be pulled-high by software and it is also a pin-change wake up pin. p77 can be defined as an open-drain output. p60~p67 27~34 i/o general bi-directional port. all of its pins can be pulled-high by software, and pin-change wake up pins. p50~p57 11~18 i/o general bi-directional i/o port. all of it s pins can be pulled-hi gh individually by software. vdd 38 - power supply pin. vss 1 - ground pin. /int 2 i an interrupt schmitt-triggered pin. the function of interrupt tr iggers at the falling edge. users can enable it by software. sdi 7 i/o serial data in for spi sdo 8 i/o serial data out for spi. sck 9 i/o serial clock for spi. /ss 10 i/o /slave select for spi.
em78p451s 8-bit microcontroller with otp rom 4 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 4 function description ioc5 r5 p 5 0 p 5 1 p 5 2 p 5 3 p 5 4 p 5 5 p 5 6 p 5 7 ioc6 r6 p 6 0 p 6 1 p 6 2 p 6 3 p 6 4 p 6 5 p 6 6 p 6 7 ioc7 r7 p 7 0 p 7 1 p 7 2 ioc8 r8 p 8 0 p 8 1 p 8 2 p 8 3 p 8 4 p 8 5 p 8 6 p 8 7 ioc9 r9 p 9 0 p 5 5 / / s s spi engin tmr1 acc r3 stack 1 stack 2 stack 3 stack 4 stack 5 p c rom instruction register instruction decoder alu interrupt control /int r4 ram wdt timer prescaler oscillator/ timming control wdt time-out r1(tcc) sleep & wake up control data & control bus p 9 4 / s c k p 9 3 / s d o p 9 2 / s d i p 9 1 fig. 2 functional block diagram 4.1 operational registers 4.1.1 r0 (indirect address register) r0 is not a physically implemented regist er. it is used as an indirect addressing pointer. any instruction using r0 as regi ster actually accesse s data pointed by the ram select register (r4). 4.1.2 r1 (tcc) increased by the instru ction cycle clock. written and read by program as any other register. 4.1.3 r2 (program counter) & stack r2 and the hardware stacks are 12 bits wide. the structure is depicted in fig. 3. generates 4k 13 on-chip rom addresses to the relative programming instruction codes. one program page is 1024 words long. all the r2 bits are set to "1 "s as a reset condition occurs.
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 5 (this specification is subject to change without further notice) "jmp" instruction allows direct loading of the lower 10 program counter bits. thus, "jmp" allows jump to any location on one page. "call" instruction loads the lower 10 bits of the pc, and then pc+1 is pushed into the stack. thus, the subroutine entry address can be located anywhere within a page "ret" ("retl k", "reti") instruction loads the program counter with the contents at the top of stack. "mov r2, a" allows the loading of an addre ss from the "a" register to the lower 8 bits of pc, and the ninth and tenth bi ts (a8~a9) of pc are cleared. "add r2, a" allows a relative address be added to the current pc, and the ninth and tenth bits of pc are cleared. any instruction that is wr itten to r2 (e.g. "add r2, a", "mov r2, a", "bc r2,6", ????? ) (except "tbl") will cause the ninth and t enth bits (a8~a9) of pc to be cleared. thus, the computed jump is limited to the first 256 locations of any program page. "tbl" allows a relative address be added to the current pc (r2+a r2), and contents of the ninth and tenth bits (a8~ a9) of pc are not changed. thus, the computed jump can be on the second (or third, 4th) 256 locations on one program page. in case of em78p451s, the most significant bits (a10~a11) will be loaded with the contents of bits ps0~ps1 in the status re gister (r3) upon the execution of a "jmp", "call", or any other instruct ions which writes to r2. all instructions are single instruction cycle (fclk/2 or fclk/4) except for the instruction that would change the contents r2. such instruction will need one more instruction cycle. a7 ~ a0 on-chip program memory ) ''') ) hardware vector user memory space software vector reset vector ) a9 a8 a11 a10 stack level 1 stack level 3 stack level 2 stack level 4 stack level 5 call 00 page0 0000~03ff 01 page1 0400~07ff 10 page2 0800~0bff 11 page3 0c00~0fff r3 ret retl reti fig. 3 program counter organization
em78p451s 8-bit microcontroller with otp rom 6 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 4.1.4 r3 (status register) 7 6 5 4 3 2 1 0 gp ps1 ps0 t p z dc c bit7 (gp) general read/write bit. bit6 (ps1) ~ 5 (ps0) page select bits. ps0~ps1 are used to pre-select a program memory page. when executing a "jmp", "call", or other instructions which causes the program counter to be changed (e.g. mov r2, a), ps0~ps1 are loaded into the 11th and 12th bits of the program counter where it selects selecting one of the available program me mory pages. note that ret (retl, reti) instruction does not change the ps0~ ps1 bits. that is, the return will always be to the page from where the subroutine was called, regardless of the current setting of ps0~ps1 bits. ps1 bit is not used (read as "0") and cannot be modified in em78p451s. ps1 ps0 program memory page [address] 0 0 page 0 [000-3ff] 0 1 page 1 [400-7ff] 1 0 page 2 [800-bff] 1 1 page 3 [c00-fff] bit 4 (t) time-out bit. set to 1 with the "slep" and the "wdtc" commands, or during power up and reset to 0 with wdt timeout. bit 3 (p) power down bit. set to 1 during power on or by a "wdtc" command and reset to 0 by a "slep" command. bit 2 (z) zero flag. set to "1" if the result of an arithmetic or logic operation is zero. bit 1 (dc) auxiliary carry flag bit 0 (c) carry flag 4.1.5 r4 (ram select register) bits 7~6 determine which bank is activated among the 4 banks. bits 5~0 are used to select the registers (addr ess: 00~3f) in the indirect addressing mode. if no indirect addressing is used, the rsr is used as an 8-bit general-purposed read/writer register. see the configuration of t he data memory in fig. 4.
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 7 (this specification is subject to change without further notice) 4.1.6 r5~r8 (port 5 ~ port8) four general 8 bits i/o registers both p74 and p76 read or write data from the data pin, while both p75 and p77 read or write data from the clk pin. 4.1.7 r9 (port9) a general 6-bit i/o register. the values of the two most significant bits are read as "0". (port9) r9 ioc9 (i/o port control register) (spi read buffer) ra reserve reserve (spi write buffer) rb (spi status buffer) rc (spi control buffer) rd iocc (timer1 control register) iocd (pull_high control register) (wdt control register) (timer1 register) re (pulse width preset register) rf aaddress r page registers ioc page registers 00 r0 (indirect addressing register) reserve 01 r1 (time clock counter) cont (control register) 02 r2 (program counter) reserve 03 r3 (status register) reserve 04 r4 (ram select register) reserve 05 r5 (port5) ioc5 (i/o port control register) 06 r6 (port6) ioc6 (i/o port control register) 07 r7 (port7) ioc7 (i/o port control register) 08 09 0a 0b 0c 0d 0e ioce 0f iocf (interrupt mask register) 10 m 1f general registers 20 j 3e bank0 bank1 bank2 bank3 3f r3f (interrupt status register) (port8) r8 ioc8 (i/o port control register) fig. 4 data memory configuration
em78p451s 8-bit microcontroller with otp rom 8 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 4.1.8 ra (spirb: spi read buffer) address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 0x0a spirb/ra srb7 srb6 srb5 srb4 srb3 srb2 srb1 srb7~srb0 are the 8-bit data when complete transmission by spi. 4.1.9 rb (spiwb: spi write buffer) address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0b spiwb/rb swb7 swb6 swb5 swb4 swb3 swb2 swb1 swb0 swb7~swb0 are the 8-bit data that are waiting for transmission by spi. 4.1.10 rc (spis: spi status segister) address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0c spis/rc -- -- -- tm1if od3 od4 rbfif rbf bits 7 ~ 5 not used. bit 4 (tm1if): 0 = in timer1 mode, receiving not completed yet, and an interrupt does not occur. 1 = in timer1 mode, receiving completed, and an interrupt occurs if enabled. bit 3 (od3): open-drain control bit 0 = open-drain disable for sdo. 1 = open-drain enable for sdo, bit 2 (od4): open-drain control bit 0 = open-drain disable for sck. 1 = open-drain enable for sck, bit 1 (rbfif): read buffer full interrupt flag 0 = receiving not completed yet; and spirb has not fully exchanged. 1 = receiving completed, spirb is fully exchanged, and an interrupt occurs if enabled. bit 0 (0rbf): read buffer full flag 0 = receiving not completed yet, and spirb has not fully exchanged. 1 = receiving completed; spirb is fully exchanged.
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 9 (this specification is subject to change without further notice) 4.1.11 rd (spic: spi control register) address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0d spic/rd ces spie sro sse - sbrs2 sbrs1 sbrs0 bit 7 (ces): clock edge select bit 0 = data shifts out on rising edge, and shifts in on falling edge. data is on hold during the low level. 1 = data shifts out on falling edge, and shifts in on rising edge. data is on hold during the high level. bit 6 (spie): spi enable bit 0= disable spi mode 1= enable spi mode bit 5 (sro): spi read overflow bit 0 = no overflow 1 = a new data is received while the previous data is still being held in the spib register. in this situation, the da ta in spis register will be destroyed. to avoid setting this bit, users had better read spirb register even if only the transmission is implemented. note this can only occur in slave mode. bit 4 (sse): spi shift enable bit 0 = reset as soon as the shifting is complete, and the next byte is ready to shift. 1 = start to shift, and keep on 1 while the current byte is still being transmitted. note this bit will reset to 0 at every one-byte transmission by the hardware bit 2~bit 0 (sbrs): spi baud rate select bits spi baud rate table is illustrated in spi section in later pages.
em78p451s 8-bit microcontroller with otp rom 10 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 4.1.12 re (tmr1: timer1 register) address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0e tmr1/re tmr17 tmr16 tmr15 tmr14 tmr13 tmr12 tmr11 tmr10 tmr17~tmr10 is bit set of timer1 register and it increases until the value matches pwp and then, it resets to 0. 4.1.13 rf (pwp: pulse width preset register) address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0f pwp/rf pwp7 pwp6 pwp5 pwp4 pwp3 pwp2 pwp1 pwp0 pwp7~pwp0 is bit set of pulse width preset in advance for the desired width of baud clock. 4.1.14 r20~r3e (general purpose register) ra~r1f, and r20~r3e (including banks 0~3) are general-purpose registers. 4.1.15 r3f (interrupt status register) address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x3f isr/r3f - - - - tm1if spiif exif tcif bits 7~4 are not used and read as ?0?. bit 3 (tm1if) timer1 interrupt flag. set by the co mparator at timer1 application, flag cleared by software. bit 2 (spiif) spi interrupt flag. set by data transmission complete, flag cleared by software. bit 1 (exif) external interrupt flag. set by falling edge on /int pin, flag cleared by software bit 0 (tcif) the flag of the tcc overflow interrupt. set as tcc overflow; flag cleared by software. "1" means interrupt reques t, "0" means non-interrupt. r3f can be cleared by instruction, but cannot be set by instruction. iocf is the interrupt mask register. note that to read r3f will result to "logic and" of r3f and iocf. 4.2 special purpose registers 4.2.1 a (accumulator) internal data transfer, or instruction operand holding. a non-addressable register.
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 11 (this specification is subject to change without further notice) 4.2.2 cont (control register) 7 6 5 4 3 2 1 0 /phen /int - - pab psr2 psr1 psr0 bit 7 (/phen) i/o pin pull-high enable flag. 0: for p60~p67, p74~p75 and p90~p95, the pull-high function is enabled. 1: the pull-high function is disabled. bit 6 (int) an interrupt enable flag cannot be wr itten by the contw instruction. 0: interrupt masked by the disi instruction. 1: interrupt enabled by the en i or reti instruction. bit5, 4 not used, and to be read as ?0?. bit 3 (pab) prescaler assignment bit. 0: tcc 1: wdt bit 2 (psr2) ~ bit 0 (psr0) tcc/wdt prescaler bits. psr2 psr1 psr0 tcc rate wdt rate 0 0 0 1:2 1:1 0 0 1 1:4 1:2 0 1 0 1:8 1:4 0 1 1 1:16 1:8 1 0 0 1:32 1:16 1 0 1 1:64 1:32 1 1 0 1:128 1:64 1 1 1 1:256 1:128 bits 0~3, and 7 of the cont register are readable and writable. 4.2.3 ioc5 ~ ioc9 (i/o port control register) "1" put the relative i/o pin into high impedance, while "0" put the relative i/o pin as output. both p74 and p76 should not be defined as output pins at the same time. this also applies to both p75 and p77. only the lower 6 bits of the ioc9 register are used. 4.2.4 iocc (t1con: timer1 control register) address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0c t1con/iocc 0 0 0 0 0 tm1e tm1p1 tm1p0
em78p451s 8-bit microcontroller with otp rom 12 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) bit2 (tm1e): timer1 function enable bit 0 = disable timer1 function as default. 1 = enable timer1 function. bit1~bit0 (tm1p): timer1 prescaler bit timer1 prescaler table for fosc w ill be illustrated in the section on timer1 in later pages. 4.2.5 iocd (pull-high control register) 7 6 5 4 3 2 1 0 s7 - - - /pu9 /pu8 /pu6 /pu5 the default values of /pu5, /pu6, /pu8, and /pu9 are one, which means the pull-high function is disabled. /pu6 and /pu9 are ?and? gating with /phen, that is, when each one is written as ?0? pull high is enabled. s7 defines the driving ability of the p70-p72. 0: normal output. 1: enhance the driving ability of led. 4.2.6 ioce (wdt control register) 7 6 5 4 3 2 1 0 - ode wdte slpc roc - - /wue bits 7, and1~2 not used. bit 6 (ode) open-drain control bit. 0: both p76 and p77 are normally i/o pins. 1: both p76 and p77 pins have the open-drain function inside. the ode bit can be read and written. bit 5 (wdte) control bit used to enable watchdog timer. the wdte bit can be used only if enwdt, the code option bit, is "1". if the enwdt bit is "1", then wdt can be disabled/enabled by the wdte bit. 0: disable wdt. 1: enable wdt. the wdte bit is not used if enwdt, t he code option bit enwdt, is "0". that is, if the enwdt bit is "0", wdt is always disabled no matter what the wdte bit is. the wdte bit can be read and written.
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 13 (this specification is subject to change without further notice) bit 4 (slpc) this bit is set by hardware at the falling edge of wake-up signal and is cleared in software. slpc is used to control the oscillator operation. the oscillator is disabled (oscillator is stopped, and the controller enters the sleep2 mode) on the high-to-low transition and is enabled (the controller is awakened from sleep2 mode) on low-to -high transition. in order to ensure the stable output of the oscillator, once the oscillator is enabled again, there is a delay for approximately 18 ms (oscillator start-up timer (ost)) before the next program instru ction is executed. the ost is always activated by wake-up from sleep mode whether the code option bit enwdt is "0" or not. after waking up, the wdt is enabled if code option enwdt is "1". the block diagram of sleep2 mode and wake-up caused by input triggered is depicted in fig. 5. the slpc bit can be read and written. bit 3 (roc) roc is used for the r-option. setting roc to "1" will enable the status of r-option pins (p80, p81) to be read by the controller. clearing roc will disable the r-option function. ot herwise, the r-option function is introduced. users must connect the p81 pin or/and p80 pin to vss by a 560k ? external resistor (rex). if rex is connected/disconnected with vdd, the status of p80 (p81 ) will be read as "0"/"1" (re fer to fig. 7(b)). the roc bit can be read and written. bit 0 (/wue) control bit used to enable the wake- up function of p60~p67, p74~p75, and p90~p91. 0: enable the wake-up function. 1: disable the wake-up function. the /wue bit can be read and written. 4.2.7 iocf (interrupt mask register) 7 6 5 4 3 2 1 0 - - - - tm1ie spiie exie tcie bits 4~7 not used. individual interrupt is enabled by setting its associated control bit in iocf to "1". the iocf register could be read and written. bit 3 (tm1ie) tm1ie interrupt enable bit. 0: disable tm1ie interrupt 1: enable tm1ie interrupt bit 2 (spiie) spi interrupt enable bit. 0: disable spi interrupt 1: enable spi interrupt
em78p451s 8-bit microcontroller with otp rom 14 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) bit 1 (exie) exif interrupt enable bit. 0: disable exif interrupt 1: enable exif interrupt bit 0 (tcie) tcif interrupt enable bit. 0: disable tcif interrupt 1: enable tcif interrupt oscillator enable disable reset q d q clk p r c l clear from s/w set 4 /w ue /w ue /w ue vcc p60~p67 vcc /w ue p74~p75, p90~p91 /phen 8 fig. 5 block diagram of sleep mode and wake-up circuits on i/o ports 4.3 tcc/wdt presacler an 8-bit counter is available as prescale r for the tcc or wdt. the prescaler is available for either the tcc or wdt only at any given time, and the pab bit of cont register is used to determine the pre scaler assignment. the psr0~psr2 bits determine the prescale ratio. the prescale r is cleared each time the instruction is written to tcc under tcc mode. the wdt and prescaler, when assigned to wdt mode, are cleared by the wdtc or slep in structions. fig. 6 depicts the circuit diagram of tcc/wdt. r1(tcc) is an 8-bit timer/counter. tcc will increase by one at every instruction cycle (without prescaler).
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 15 (this specification is subject to change without further notice) the watchdog timer is a free running on-chip rc oscillator. the wdt will keep running even when the oscillator driver has been turned off (i.e. in sleep mode). during normal operation or sleep mode, a wdt time-out (if enabled) will cause the device to reset. the wdt can be enabled or disabled any time during the normal mode by software programming (if code op tion bit enwdt is "1"). refer to wdtebit of ioce register. without pr esacler, the wdt time-out period is approximately 18 ms 1 . 4.4 i/o ports the i/o registers, from port 5 to port 9, ar e bi-directional tri-state i/o ports. p60~p67, p74~p75, and p90~p91 provide internal pu ll-high. p60~p67, p74~p75, and p90~p95 provide programmable wake-up function through software. p76~p77 can have open-drain output by software control. p80~p81 are the r-option pins which are enabled by software. when the r-option function is used, it is recommended that p80 and p81 are used as output pins. during r-option enabled state, p80 and p81 must be programmed as input pins. if an external re sistor is connected to p80 (p81) for the r-option function, the current consumption should be taken as an important factor in the applications for low power consideration. the i/o ports can be defined as "input" or " output" pins by the i/o control registers (ioc5~ioc9) under program control. the i/o registers and i/o control registers are both readable and writable. the i/o interface circ uit is shown in fig. 7. note that the reading path source of input and output pi ns is different when reading the i/o port. clk(=fosc/2) data bus 1 0 m u x sync 2cycles tcc(r1) pab tcc overflow interrupt 0 1 wdt wdte (in ioce) m u x wdt timeout 8-bit counter 8- to-1 mux psr0~psr2 01 mux pab fig. 6 block diagram of tcc wdt 1 note: vdd = 5v, set up time period = 16.2ms 30% vdd = 3v, set up time period = 18.0ms 30%
em78p451s 8-bit microcontroller with otp rom 16 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) pdrd q q clk d p r c l pcwr pdwr q q clk d p r c l port 0 1 m u x iod pcrd fig. 7 (a) the circuit of i/o port and i/o control register pdrd q q clk d p r c l pcwr pdwr q q clk d p r c l 0 1 m u x iod roc vcc weakly pull-up port rex* *the rex is 560k ohm external resistor pcrd fig.7(b) the circuit of i/o port with r-option (p80, p81)
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 17 (this specification is subject to change without further notice) 4.5 serial peripheral interface mode 4.5.1 overview & features overview: figures 8, 9, and 10 show how em78p451s communicates with other devices through spi module. if em78p451s is a master contro ller, it sends clock through the sck pin. a couple of 8-bit data are transmitted and received at the same time. however, if em78p451s is defined as a slave, its sck pin could be programmed as an input pin. data will continue to be shifted based on both the clock rate and the selected edge. features: operation in either master mode or slave mode, three-wire or four-wire synchronous communication; that is, full duplex programmable baud rates of communication, programming clock polarity, (rd bit7) interrupt flag available for the read buffer full, up to 8 mhz ( maximum ) bit frequency, spi module sck spir reg sdi spiw reg spis reg /ss slave device sdo bit 7 spi module spir reg spiw reg spis reg master device fig. 8 spi master/slave communication
em78p451s 8-bit microcontroller with otp rom 18 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) sdi sdo sck /ss p50 p51 p52 p53 master slave device 1 slave device 2 slave device 3 slave device 4 vdd sdo sdi sck /ss sdo sdi sck /ss sdo sdi sck /ss sdo sdi sck /ss fig. 9 the spi configuration of single-master and multi-slave or slave1 slave 2 for master 1 slave 3 for master 1/2 slave 4 for master1/2 slave 5 for master 2 or slave6 sdi sdo sck /ss sdi sdo sck /ss p50 p51 p52 p53 p50 p51 p52 p53 sdo sdi sck /ss sdo sdi sck /ss sdo sdi sck /ss sdo sdi sck /ss master1 master2 fig. 10 the spi configuration of single-master and multi-slave
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 19 (this specification is subject to change without further notice) 4.5.2 spi function description read write spir reg spis reg shift right bit 0 bit 7 prescaler 4, 8, 16, 32, 64 spiw reg p92/sdi p93/sdo p95/ /ss p94/sck / ss edge select edge select spic bit6 tsco tmr1/2 sbr2~sbr0 8 clock select 2 noise filter spic reg sbr0 ~sbr2 rbf rbfi buffer full detector set to 1 se fig. 11 spi block diagram spi mode select register 8-1 mux 2 1 0 spic spi write register (0x0b) 7~0 spiwb spi shift buffer spi read register (0x0a) data bus fosc 1 0 t1con 6 4 spic 1 0 4 spis spic spi 7 2 intc 7~0 spirb sdo sdi /ss shift clock fig. 12 the function block diagram of spi transmission the following describes the function of each block and explains how to carry out the spi communication with the signals depicted in fig.11 and fig.12:
em78p451s 8-bit microcontroller with otp rom 20 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) p92/sdi: serial data in. p93/sdo: serial data out. p94/sck: serial clock. p95//ss: /slave select (option). this pin (/ss) may be required during a slave mode. rbf: set by buffer full detector, and reset in software. rbif: set by buffer full detector, and reset in software. buffer full detector: sets to 1 when an 8-bit shifting is completed. sse: loads the data in spis register, and begin to shift spis reg.: shifting byte in and out. the msb is shifted first. both the spis register and the spiw register are loaded at the same time. once data are written, spis starts transmission / reception. the received data will be moved to the spir register as the shifting of the 8-bit data is completed. the rbf (read buffer full) flag and the rbfi(read buffer full interrupt) flag are then set. spir reg.: read buffer. the buffer will be updated as the 8-bit shifting is completed. the data must be read before the next reception is completed. the rbf flag is cleared as the spir register reads. spiw reg.: write buffer. the buffer will deny any attempt to write until the 8-bit shifting is completed. the sse bit will be kept in 1 if the communi cation is still undergoing. this flag must be cleared as the shifting is completed. user s can determine if the next write attempt is available. sbrs2~sbrs0: programming the clock frequency/rates and sources. clock select:selecting either the internal or external clock as the shifting clock. edge select: selecting the appropriate clock edges by programming the ces bit 4.5.3 spi signal & pin description the detailed functions of the four pins, sd i, sdo, sck, and /ss, which are shown in fig. 9, are as follows: sdi/p92 (pin 7): serial data in, receive serially, the most significant bi t (msb) first, least significant bit (lsb) last, defined as high-impedance, if not selected, program the same clock rate and clock edge to latch on both the master and slave devices,
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 21 (this specification is subject to change without further notice) the received byte will update the transmitted byte, both the rbf and rbfif bits (located in register 0x0c) will be set as the spi operation is completed. timing is shown in fig.13 and14. sdo/p93 (pin 8): serial data out, transmit serially; the most significant bi t (msb) first, least significant bit (lsb) last, program the same clock rate and clock edge to latch on both the master and slave devices, the received byte will update the transmitted byte, the ces (located in register 0x0d) bi t will be reset, as the spi operation is completed. timing is shown in fig.13 and 14. sck/p94 (pin 9): serial clock generated by a master device synchronize the data communication on both the sdi and sdo pins the ces (located in register 0x0d) is used to select the edge to communicate. the sbr0~sbr2 (located in register 0x0d) is used to determine the baud rate of communication the ces, sbr0, sbr1, and sbr2 bits have no effect in the slave mode timing is show in fig.13 and 14 /ss/p95 (pin 10): slave select; negative logic, generated by a master device to signi fy the slave(s) to receive data, goes low before the first cycle of sc k appears, and remains low until the last (eighth) cycle is completed, ignores the data on the sdi and sdo pins while /ss is high, because the sdo is no longer driven. timing is shown in fig.13 and fig. 14.
em78p451s 8-bit microcontroller with otp rom 22 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 4.5.4 programmed the related registers as the spi mode is defined, the related regist ers of this operation are shown in table 2 and table 3. table 2 related control registers of the spi mode address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0d *spic/rd ces spie sro sse -- sbr2 sbr1 sbr0 0x0f intc/iocf -- -- -- -- tm1ie spiie exie tcie spic: spi control register. bit 7 (ces): clock edge select bit 0 = data shifts out on rising edge, and shifts in on falling edge. data is on hold during the low level. 1 = data shifts out on falling edge, and shifts in on rising edge. data is on hold during the high level. bit 6 (spie): spi enable bit 0 = disable spi mode 1 = enable spi mode bit 5 (sro): spi read overflow bit 0 = no overflow. 1 = a new data is received while the previous data is still being on hold in the spib register. under this condition, t he data in spis register will be destroyed. to avoid setting this bit, users should read the spirb register even if the transmission is implemented only. note this can only occur under slave mode. bit 4 (sse): spi shift enable bit 0 = reset as soon as the shifting is completed and the next byte is ready to shift. 1 = start to shift, and stays on 1 while the current byte continues to transmit. note this bit can be reset by hardware only.
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 23 (this specification is subject to change without further notice) bit 2~0 (s brs): spi baud rate select bits sbrs2 (bit 2) sbrs1 (bit 1) sbrs0 (bit 0) mode baud rate 0 0 0 master fsco/2 0 0 1 master fsco/4 0 1 0 master fsco/8 0 1 1 master fsco/16 1 0 0 master fsco/32 1 0 1 slave /ss enable 1 1 0 slave /ss disable 1 1 1 master tmr1/2 note in master mode, /ss is disable. intc: interrupt control register bit 3 (tm1ie) tm1ie interrupt enable bit. 0: disable tm1ie interrupt 1: enable tm1ie interrupt bit 2 (spiie) spi interrupt enable bit. 0: disable spi interrupt 1: enable spi interrupt bit 1 (exie) exif interrupt enable bit. 0: disable exif interrupt 1: enable exif interrupt bit 0 (tcie) tcif interrupt enable bit. 0: disable tcif interrupt 1: enable tcif interrupt table 3 related status/data registers of the spi mode address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0a spirb/ra srb7 srb6 srb5 srb4 srb3 srb2 srb1 srb0 0x0b spiwb/rb swb7 swb6 swb5 swb4 swb3 swb2 swb1 swb0 0x0c spis/rc 0 0 0 tm1if od3 od4 rbfif rbf spirb: spi read buffer. once the serial data is received completely, it will load to spirb from spisr. the rbf bit and the rbfif bit in the spis register will be set also. spiwb: spi write buffer. as a transmitted data is loaded, the spis register stands by and start to shift the data when sensing sck edge with sse set to ?1?.
em78p451s 8-bit microcontroller with otp rom 24 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) spis: spi status register bit 4 (tm1if): timer1 interrupt flag. bit 3 (od3) open-drain control bit (p93) 0 = open-drain disable for sdo. 1 = open-drain enable for sdo, bit 2 (od4): open drain-control bit (p94) 0 = open-drain disable for sck. 1 = open-drain enable for sck bit 1 (rbfif): read buffer full interrupt flag 1 = receive is completed, spib is fu ll, and an interrupt occurs if enabled. 0 = receive is ongoing, spib is empty. bit 0 (rbf): read buffer full flag 0 = receive is ongoingt, spib is empty. 1 = receive is completed, spib is full. 4.5.5 spi mode timing the edge of sck is selected by programming bit ces. the waveform shown in fig.13 is applicable regardless of whether the em78p451s is under master or slave mode with /ss disabled. however, the waveform in fig. 14 can only be implemented in slave mode with /ss enabled. fig. 13 spi mode with /ss disable
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 25 (this specification is subject to change without further notice) fig. 14 spi mode with /ss enable 4.5.6 software application of spi example for spi: for master org 0x0 setting: clra iow 0x05 ;set port5 output iow 0x06 ;set port6 output mov 0x05,a mov a,@0b11001111 ;set prescaler for wdt contw mov a,@0b00010001 ;disable wakeup function iow 0x0e mov a,@0b00000000 ;disable interrupt iow 0x0f mov a,@0x07 ;sdi input and sdo, sck output iow 0x09 mov a,@0b10000000 ;clear rbf and rbfif flag
em78p451s 8-bit microcontroller with otp rom 26 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) mov 0x0c,a mov a,@0b11100000 ;select clock edge and enable spi mov 0x0d,a start: wdtc bc 0x0c,1 ;clear rbfif flag mov a,@0xff mov 0x05,a ;show a signal at port5 mov 0x0a,a ;move ff at read buffer mov a,@0xaa ;move aa at write buffer mov 0x0b,a bs 0x0d,4 ;start to shift spi data nop jbc 0x0d,4 ;polling loop for checking spi transmission completed jmp $-2 bc 0x03,2 call delay ;to catch the data from slaver mov a,0x0a xor a,@0x5a ;compare the data from slaver jbs 0x03,2 jmp start flag: mov a,@0x55 ;show the signal when re ceiving correct data from slaver mov 0x05,a call delay jmp start delay: ; (user?s program) eop org 0xfff jmp setting
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 27 (this specification is subject to change without further notice) for slaver org 0x0 initi: jmp init org 0x2 interrupt: ;interrupt address mov a,@0x55 mov 0x06,a ;show a signal at port 6 when entering interrupt mov a,@0b11100110 ;enable spi, /ss disabled mov 0x0d,a bs 0x0d,4 ;keep sse at 1 to wait for sck signal in order to shift data mov a,@0x00 ;move 00 to write buffer in order to keep master?s read buffer as 00 mov 0x0b,a bs 0x0d,4 ;keep sse at 1 to wait for sck signal in order to shift data nop jbc 0x0d,4 ;polling loop for checking spi transmission completed jmp $-2 bs 0x0d,4 ;keep sse at 1 to wait for sck signal in order to shift data bc 0x03,2 mov a,0x0a mov 0x06,a ;read master?s data from read buffer xor a,@0xaa ;check pass signal from read buffer jbs 0x03,2 jmp $-6 jmp spi org 0x30 init: clra iow 0x05 iow 0x06
em78p451s 8-bit microcontroller with otp rom 28 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) mov 0x05,a mov 0x06,a mov a,@0xff iow 0x08 mov a,@0b11001111 ;set prescaler for wdt contw mov a,@0b00010001 ;disable wakeup function iow 0x0e mov a,@0b00000010 ;enable external interrupt iow 0xf eni mov a,@0b00110111 iow 0x09 bc 0x3f,1 ;clear rbfif flag nop jbs 0x3f,1 ;polling loop for checking interrupt occurence jmp $-2 jmp interrupt spi: bs 0x0d,4 ;keep sse enabled as long as possible wdtc mov a,@0x0f ;show a signal when entering spi loop mov 0x06,a jbc 0x08,1 ;choose p81 as a signal button jmp spi mov a,@0x5a ;move 5a into write buffer when p81 button is pushed mov 0x0b,a nop jbc 0x0d,4 ;polling loop for checking spi transmission completed jmp $-2 bs 0xd,4
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 29 (this specification is subject to change without further notice) nop nop mov a,@0xf0 ;display at port6 when p81 button is pushed mov 0x06,a mov a,@0x00 ;send a signal to master to prevent infinite loop mov 0x0b,a nop jbc 0x0d,4 jmp $-2 bs 0x0d,4 bs 0x0c,7 bc 0x0c,1 nop jmp spi delay: ; (user?s program) eop org 0xfff jmp initi
em78p451s 8-bit microcontroller with otp rom 30 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 4.6 timer 1 4.6.1 overview timer1(tmr1) is an eight-bit clock counter with a programmable prescaler. it is designed for the spi module as a baud rate clock generator. tmr1 can be read and written and cleared on any reset conditions. if employed, it can be turned down for power saving by setting tmr1en bit [t1con<2>] to 0. 4.6.2 function description fig. 15 shows timer1 block diagram. each signal and block is described as follows: comarator pwp tmr1 increase eq reset sets tmr1if clock output prescaler 1:1 to 1:16 osc/4 osc/2 fig. 15 timer1 block diagram osc/4:input clock. prescaler: option of 1:1, 1:4, 1: 8, and 1:16 defined by t1p1 and t1p02 (t1con<1, 0>). it is cleared when a val ue is written to tmr1 or t1con, and during any kind of reset as well. pwp: pulse width preset register. the desired width of baud clock is written in advance. tmr1: timer 1 register. tmr1 increas es until it matches with pwp, and then resets to 0. if it is chosen optionally in the spi mode, its output is fed as a shifting clock. comparator: to change the output status while a match occurs. the tmr1if flag will be set at the same time. 4.6.3 programmed the related registers the related registers of the defining tmr1 operation are shown in table 4 and table 5 table 4 related control registers of the tmr1 address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0c spis/rc 0 0 0 tm1if od3 od4 rbfif rbf 0x0f intc/iocf 0 0 0 0 tm1ie spiie exie tcie table 5 related status/data registers oftmr1 address name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x0e tmr1/re tmr17 tmr16 tmr15 tmr14 tmr13 tmr12 tmr11 tmr10 0x0f pwp/rf pwp7 pwp6 pwp5 pwp4 pwp3 pwp2 pwp1 pwp0 0x0c t1con/iocc 0 0 0 0 0 tm1e tm1p1 tm1p0
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 31 (this specification is subject to change without further notice) tmr1: timer1 register tmr17~tmr10 is bit set of timer1 r egister and it increases until the value matches pwp and then it reset to 0. pwp: pulse width preset register pwp7~pwp0 is bit set of pulse width pres et for the desired width of baud clock in advance. t1con: timer1 control register bit 2 (tm1e): timer1 enable bit bit 1 (tm1p1) and bit 0 (tm1p): timer1 prescaler for fsco tm1p1 tm1p0 prescaler rate 0 0 1:1 0 1 1:4 1 0 1:8 1 1 1:16 4.7 reset and wake-up a reset is initiated by (1) power on reset, or (2) /reset pin input ?low?, or (3) wdt timeout. (if enabled) wdte setup time wdt wdt timeout power- on reset voltage detector oscillator vdd dq clk clr clk reset fig. 16 block diagram of reset
em78p451s 8-bit microcontroller with otp rom 32 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) em78p451s por voltage range is 1.2v~2.0v. under customer application, when power is off, vdd must drop to below 1.2v and remains off for 10us before power can be switched on again. this way, the em78p451s will reset and work normally. the extra external reset circuit will work well if vdd can rise at very fast speed (50 ms or less). however, under most cases where cr itical applications are involved, extra devices are required to assist in solving the power-up problem. the device is kept in a reset condition for a period of approx. 18ms 2 (one oscillator start-up timer period) after the reset is detected and fig.16 is the block diagram of reset. once the reset occurs, the following functions are performed. the oscillator is running, or will be started. the program counter (r2) is set to all "1". when power is switched on, bits 5~6 of r3 and the upper 2 bits of r4 are cleared. all i/o port pins are configured as input mode (high-impedance state). the watchdog timer and prescaler are cleared. the watchdog timer is enabled if code option bit enwdt is "1". the cont register is set to all "1" except bit 6 (int flag). bits 3,6 of ioce register are cleared, bits 0,4~5 of ioce register are set to "1". bits 0 of r3f and bits 0 of iocf registers are cleared. the sleep mode (power down) is achieved by executing the slep instruction (named as sleep1 mode). while entering sleep mode, the wdt (if enabled) is cleared but keeps on running. the controller is awak ened by wdt timeout (if enabled), and it will cause the controller to reset. the t and p flags of r3 are used to determine the source of the reset (wake-up). in addition to the basic sleep1 mode, em78p451s has another sleep mode (caused by clearing "slpc" bit of ioce regist er, designated as sleep2 mode). in the sleep2 mode, the controller can be awakened by- (a) any one of the wake-up pins is set to ?0.? (refer to fig.17). upon waking, the controller will continue to exec ute the program in-line. in this case, before entering sleep2 mode, the wake-up function of t he trigger sources (p60~p67, p74~p75, and p90~p91)should be selected (e.g. input pin) and enabled (e.g. pull-high, wake-up control). one caution should be noted is that after waking up, the wdt is enabled if code option bit enwdt is "1". the wdt operation (to be enabled or disabled) should be appropriately controlled by software after waking up. (b) wdt time-out (if enabled). or external reset input on /reset pin will trigger a controller reset.. 2 note: vdd = 5v, set up time period = 16.20ms 30% vdd = 3v, set up time period = 18.0ms 30%
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 33 (this specification is subject to change without further notice) table 6 usage of sleep and sleep2 mode usage of sleep and sleep2 mode sleep2 sleep (a) before sleep (a) before sleep 1. set port6 or p74 or p75 input 1. execute slep instruction 2. enable pull-high and set wdt prescaler over 1:1 (set cont.7 and cont.3 ~ cont.0) 3. enable wake-up (set iocb or ioce.0) 4. execute seep2 (set ioce.4) (b) after wake-up (b) after wake-up 1. next instruction 1. reset 2. disable wake-up 3. disable wdt (set ioce.5) if port6 input status changed wake-up is used to wake-up the em78p451s (case [a] above), the following instructions must be ex ecuted before entering sleep2 mode: mov a, @11111111b ; set port6 input iow ioc6 mov a, @0xxx1010b ; set port6 pull-high, wdt prescaler, prescaler must set over 1:1 contw mov a, @xx00xxx0b ; enable port6 wake-up function, enable sleep2 iow ioce after wake-up nop mov a, @ xx01xxx1b ; disable port 6 wake-up function; disable wdt iow ioce after waking up from the sleep2 mode, wdt is aut omatically enabled. the wdt enabled/disabled operation after waking up from sleep2 mode should be appropriately defined in the software. to avoid a reset from occurring when the port 6 in put status changed interrupt enters into interrupt vector or is used to wake-up the mcu, the wdt prescaler must be set above the 1:1 ratio. table 7 the summary of the initialized values for registers address name reset type bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 bit name c57 c56 c55 c54 c53 c52 c51 c50 n/a ioc5 power-on 1 1 1 1 1 1 1 1 /reset and wdt 1 1 1 1 1 1 1 1 wake-up from pin change p p p p p p p p bit name c67 c66 c65 c64 c63 c62 c61 c60 n/a ioc6 power-on 1 1 1 1 1 1 1 1 /reset and wdt 1 1 1 1 1 1 1 1 wake-up from pin change ppppp p p p bit name c77 c76 c75 c74 c73 c72 c71 c70 n/a ioc7 power-on 1 1 1 1 1 1 1 1 /reset and wdt 1 1 1 1 1 1 1 1 wake-up from pin change ppppp p p p bit name c87 c86 c85 c84 c83 c82 c81 c80 n/a ioc8 power-on 1 1 1 1 1 1 1 1 /reset and wdt 1 1 1 1 1 1 1 1
em78p451s 8-bit microcontroller with otp rom 34 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) address name reset type bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 wake-up from pin change p p p p p p p p bit name c97 c96 c95 c94 c93 c92 c91 c90 n/a ioc9 power-on 1 1 1 1 1 1 1 1 /reset and wdt 1 1 1 1 1 1 1 1 wake-up from pin change p p p p p p p p bit name /phe n /int - - pab psr 2 psr 1 psr 0 n/a cont power-on 1 0 1 1 1 1 1 1 /reset and wdt 1 p 1 1 1 1 1 1 wake-up from pin change ppppp p p p bit name - - - - - - - - 0x00 r0(iar) power-on u u u u u u u u /reset and wdt ppppp p p p wake-up from pin change ppppp p p p bit name - - - - - - - - 0x01 r1(tcc) power-on 0 0 0 0 0 0 0 0 /reset and wdt 0 0 0 0 0 0 0 0 wake-up from pin change ppppp p p p bit name - - - - - - - - 0x02 r2(pc) power-on 1 1 1 1 1 1 1 1 /reset and wdt 1 1 1 1 1 1 1 1 wake-up from pin change ** p ** p ** p ** p ** p ** p ** p ** p bit name gp ps1 ps0 t p z dc c 0x03 r3(sr) power-on 0 0 0 t t u u u /reset and wdt 0 0 0 t t p p p wake-up from pin change p p p t t p p p bit name rsr. 1 rsr. 0 - - - - - - 0x04 r4(rsr) power-on 0 0 u u u u u u /reset and wdt 0 0 p p p p p p wake-up from pin change ppppp p p p bit name p57 p56 p55 p54 p53 p52 p51 p50 0x05 r5(p5) power-on u u u u u u u u /reset and wdt p p p p p p p p wake-up from pin change p p p p p p p p bit name p67 p66 p65 p64 p63 p62 p61 p60 0x06 r6(p6) power-on u u u u u u u u /reset and wdt ppppp p p p wake-up from pin change ppppp p p p bit name p77 p76 p75 p74 p73 p72 p71 p70 0x07 r7(p7) power-on u u u u u u u u /reset and wdt ppppp p p p wake-up from pin change ppppp p p p bit name p87 p86 p85 p84 p83 p82 p81 p80 0x08 r8(p8) power-on u u u u u u u u /reset and wdt ppppp p p p
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 35 (this specification is subject to change without further notice) address name reset type bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 wake-up from pin change ppppp p p p bit name p97 p96 p95 p94 p93 p92 p91 p90 0x09 r9(p9) power-on u u u u u u u u /reset and wdt ppppp p p p wake-up from pin change ppppp p p p bit name srb 7 srb 6 srb 5 srb 4 srb 3 srb 2 srb 1 srb 0 0x0a ra(spirb) power-on u u u u u u u u /reset and wdt p p p p p p p p wake-up from pin change p p p p p p p p bit name swb 7 swb 6 swb 5 swb 4 swb 3 swb 2 swb 1 swb 0 0x0b rb(spiwb) power-on u u u u u u u u /reset and wdt p p p p p p p p wake-up from pin change p p p p p p p p bit name ens do obd c ibdc tiif od3 od4 rbfi f rbf 0x0c rc(spis) power-on 0 0 0 0 0 0 0 0 /reset and wdt 0 0 0 0 0 0 0 0 wake-up from pin change p p p p p p p p bit name ces spie sro spis e - sbr s2 sbr s1 sbr s0 0x0d rd(spic) power-on 0 0 0 0 0 0 0 0 /reset and wdt 0 0 0 0 0 0 0 0 wake-up from pin change p p p p p p p p bit name tmr 17 tmr 16 tmr 15 tmr 14 tmr 13 tmr 12 tmr 11 tmr 10 0x0e re(tmr1) power-on 0 0 0 0 0 0 0 0 /reset and wdt 0 0 0 0 0 0 0 0 wake-up from pin change p p p p p p p p bit name pwp 7 pwp 6 pwp 5 pwp 4 pwp 3 pwp 2 pwp 1 pwp 0 0x0f rf(pwp) power-on 1 1 1 1 1 1 1 1 /reset and wdt 1 1 1 1 1 1 1 1 wake-up from pin change p p p p p p p p bit name - - - - t1if spiif exif tcif 0x3f r3f(isr) power-on u u u u 0 0 0 0 /reset and wdt u u u u 0 0 0 0 wake-up from pin change u u u u p p p p bit name - - - - - t1e t1p1 t1p0 0x0c iocc power-on 0 0 0 0 0 0 0 0 /reset and wdt 0 0 0 0 0 0 0 0 wake-up from pin change p p p p p p p p bit name s7 - - - /pu9 /pu8 /pu6 /pu5 0x0d iocd power-on 1 1 1 1 1 1 1 1 /reset and wdt 1 1 1 1 1 1 1 1
em78p451s 8-bit microcontroller with otp rom 36 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) address name reset type bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 wake-up from pin change p p p p p p p p bit name - ode wte slp c roc - - /wu e 0x0e ioce power-on u 0 1 1 0 u u 1 /reset and wdt u 0 1 1 0 u u 1 wake-up from pin change u p 1 1 p u u p bit name - - - - t1ie spii e exie tcie 0x0f iocf power-on u u u u 0 0 0 0 /reset and wdt u u u u 0 0 0 0 wake-up from pin change u u u u p p p p bit name - - - - - - - - 0x10~0x3e gpr power-on u u u u u u u u /reset and wdt ppppp p p p wake-up from pin change ppppp p p p ** to execute the next instruction after the ?slp c? bit status of ioce register being on high-to-low transition. x: note used. u: unknown or don?t care. -: not defi ned p: previous value before reset. t: check table 7 the status of rst, t, and p of status register a reset condition is initiated by the following events: 1. a power-on condition, 2. watchdog timer time-out. the values of t and p, listed in table 7 ar e used to check how the processor wakes up. table 8 shows the events that may affect the status of t and p. table 8 the values of rst, t and p after reset reset type t p power on 1 1 wdt during operating mode 0 p wdt wake-up during sleep1 mode 0 0 wdt wake-up during sleep2 mode 0 p wake-up on pin change during sleep2 mode p p * p: previous value before reset
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 37 (this specification is subject to change without further notice) table 9 the status of rst, t and p being affected by events event t p power on 1 1 wdtc instruction 1 1 wdt time-out 0 * p slep instruction 1 0 wake-up on pin change during sleep2 mode p p * p: previous value before reset 4.8 interrupt the em78p451s has the following interrupts. 1. /tcc overflow interrupt 2. external interrupt (/int) 3. serial peripheral interface ( spi) transmission completed interrupt. 4. timer1 comparator completed interrupt. r3f is the interrupt status register, which reco rds the interrupt request in flag bit. iocf is the interrupt mask register. global in terrupt is enabled by eni instruction and is disabled by disi instruction. when one of the interrupts (if enabled) is generated, will cause the next instruction to be fetched fr om address 001h. once in the interrupt service routine the source of the interrupt can be determined by polling the flag bits in the r3f register. the interrupt flag bit mu st be cleared by software before leaving the interrupt service routine and enabling inte rrupts to avoid recursive interrupts. the flag in the interrupt status register (r3f) is set regardless of t he status of its mask bit or the execution of eni instruction. note that reading r3f will obtain the output of logic and of r3f and iocf (refer to fig. 17) . the reti instruction exits interrupt routine and enables the global interrupt (execution of eni instruction). when an interrupt is generated by int inst ruction (if enabled), it causes the next instruction to be fetched from address 002h.
em78p451s 8-bit microcontroller with otp rom 38 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) q q clk d p r c l q q clk d p r c l /irqn r3f reset iocf rfwr iocfrd iocfwr rfrd irqn irqm iod eni/disi interrupt fig. 17 interrupt input circuit 4.9 oscillator 4.9.1 oscillator modes the em78p451s can operate in four different oscillator modes. there are high xtal (hxt) oscillator mode, low xtal (lxt) oscillator mode, external rc oscillator mode (erc), and internal c e external r oscillator modes. user can select one of them by programming ms, rct, hlf and hlp in the code option register. table 9 depicts how these three modes are defined. table 10 oscillator modes by ms, irc, rct. mode ms rct hlf hlp high xtal oscillator 1 x 1 x low xtal oscillator 1 x 0 0 external rc oscillator 0 1 x x external r and internal c oscillator 0 0 x x x: don?t care 4.9.2 crystal oscillator/ceramic resonators (xtal) em78p451s can be driven by an external cloc k signal through the osci pin as shown in fig 18 below. in the most applications, pin osci and pin osco is connected with a crystal or ceramic resonator to generate oscillation. fig 19 depicts such circuit. table 10 provides the recommended values of c1 and c2. since each resonator has its own attribute, user should refer to its specificat ion for appropriate values of c1 and c2. rs, a serial resistor may be necessary for at strip cut crystal or low frequency mode.
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 39 (this specification is subject to change without further notice) osci osco em78p451s ext. clock fig. 18 circuit for external clock input osci osco em78p451s c1 c2 xtal rs fig. 19 circuit for crystal/resonator table 11 capacitor selection guide for crystal oscillator ceramic resonators oscillator type frequency mode frequency c1 (pf) c2 (pf) 455 khz 10~150 10~150 1.0 mhz 40~80 40~80 2.0 mhz 20~40 20~40 ceramic resonator hxt 4.0 mhz 10~30 10~30 32.768 khz 25 15 100 khz 25 25 lxt 200 khz 25 25 455 khz 20~40 20~150 1.0 mhz 15~30 15~30 2.0 mhz 15 15 crystal oscillator hxt 4.0 mhz 15 15
em78p451s 8-bit microcontroller with otp rom 40 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 4.9.3 rc oscillator mode for some applications that do not need a ve ry precise timing calculation, the rc oscillator (fig 22 & fig 23) offers a lot of co st savings. nevertheless, it should be noted that the frequency of the rc oscillator is infl uenced by the supply voltage, the values of the resistor (rext), the capacitor (cex t), and even by the operation temperature. moreover, the frequency also changes slight ly from one chip to another due to the manufacturing process variation. in order to maintain a stable system frequenc y, the values of the cext should not be less than 20pf, and that the value of rext should not be greater than 1 m ohm. if they cannot be kept in this range, the frequency is easily affected by noise, humidity, and leakage. the smaller the rext in the rc oscillator, the faster its frequency will be. on the contrary, for very low rext values, for instance, 1 k ? , the oscillator becomes unstable because the nmos cannot discharge the cu rrent of the capacitance correctly. based on the reasons above, it must be kept in mind that all of the supply voltage, the operation temperature, the components of the rc oscillator, the package types, the way the pcb is layout, will affect the system frequency. osci em78p451s vcc rext cext fig. 20 circuit for external rc oscillator mode osci em78p451s vcc rext fig. 21 circuit for external r, internal c oscillator mode
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 41 (this specification is subject to change without further notice) calibrate frequency of external rc oscillator (for reference only) c ext r ext fosc @5.0v,25 
3.3k 3.4mhz 5.1k 2.2mhz 10k 1.3mhz 20pf 100k 144khz 3.3k 1.2mhz 5.1k 935khz 10k 420khz 100pf 100k 45khz 3.3k 550khz 5.1k 360khz 10k 190khz 300pf 100k 28khz internal c, external r table (for reference only) external r (ohm) fosc @5.0v, 25 
(hz) 10k 12m 15k 7.7m 20k 5.7m 30k 3.65m 51k 2.24m 100k 1.14m 150k 749k 200k 559k 510k 214k 2m 56k 3.3m 32.8k 4.10 code option register word 0 12 11 10 9 8 7 6 5 4 3 2 1 0 ms enwd t clks ptb hlf rct hlp del1 del0 ren n/a n/a n/a bit 12 (ms): oscillator type selection. 0: rc type 1: xtal type bit 11 (enwdt): watchdog timer enabled. 0: enable 1: disable bit 10 (clks): clocks of each instruction cycle. 0: two clocks 1: four clocks
em78p451s 8-bit microcontroller with otp rom 42 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) bit 9 (ptb): protect bit. 0: protect enabled 1: protect disabled bit 8 (hlf): xtal frequency selection. 0: low frequency (32.768khz) 1: high frequency this bit is useful only when bit 12 (ms) is 1. when ms is 0, hlf must be 0. bit 7 (rct) : resistor capacitor. 0: internal rc 1: external rc bit 6 (hlp): power consumption selection. 0: low power 1: high power bit 5 ~ bit 4: del1 and del0 (sdi) input delay time options. del 1 del 0 delay time 1 1 0 ns 0 1 50 ns 1 0 100 ns bit3~0 (ren): reset pin enable bit 0: enable, p70/reset=>reset pin 1: disable, p70/reset=> p70 word 1 ( user?s id code) 12 11 10 9 8 7 6 5 4 3 2 1 0 id12 id11 id10 id9 id8 id7 id6 id5 id4 id3 id2 id1 id0 4.11 instruction set each instruction in the instruction set is a 13-bit word divided into an op code and one or more operands. all instructions are ex ecuted within one single instruction cycle (consisting of 2 oscillator periods), unl ess the program counter is changed by- (a) executing the instruction "mov r2,a", "add r2,a", "tbl", or any other instructions that write to r2 (e.g. "sub r2,a", "bs r2,6", "clr r2", ???? ). (b) execute call, ret, reti, retl, jmp, c onditional skip (jbs, jbc, jz, jza, djz, djza) which were tested to be true. under these cases, the executi on takes two instruction cycles. in addition, the instruction set has the following features:
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 43 (this specification is subject to change without further notice) (1). every bit of any register c an be set, cleared, or tested directly. (2). the i/o register can be regarded as gener al register. that is, the same instruction can operate on i/o register. the symbol "r" represents a register des ignator that specifies which one of the registers (including operational registers and general purpose registers) is to be utilized by the instruction. bits 6 and 7 in r4 determine the selected register bank. "b" represents a bit field designator that selects t he value for the bit located in the register "r" and affects operation. "k" represents an 8 or 10-bit constant or literal value. instruction binary hex mnemonic operation status affected 0 0000 0000 0000 0000 nop no operation none 0 0000 0000 0001 0001 daa decimal adjust a c 0 0000 0000 0010 0002 contw a cont none 0 0000 0000 0011 0003 slep 0 wdt, stop oscillator t,p 0 0000 0000 0100 0004 wdtc 0 wdt t,p 0 0000 0000 rrrr 000r iow r a iocr none 0 0000 0001 0000 0010 eni enable interrupt none 0 0000 0001 0001 0011 disi disable interrupt none 0 0000 0001 0010 0012 ret [top of stack] pc none 0 0000 0001 0011 0013 reti [top of stack] pc, enable interrupt none 0 0000 0001 0100 0014 contr cont a none 0 0000 0001 rrrr 001r ior r iocr a none 0 0000 0010 0000 0020 tbl r2+a r2, bits 8~9 of r2 unchanged z,c,dc 0 0000 01rr rrrr 00rr mov r,a a r none 0 0000 1000 0000 0080 clra 0 a z 0 0000 11rr rrrr 00rr clr r 0 r z 0 0001 00rr rrrr 01rr sub a,r r-a a z,c,dc 0 0001 01rr rrrr 01rr sub r,a r-a r z,c,dc 0 0001 10rr rrrr 01rr deca r r-1 a z 0 0001 11rr rrrr 01rr dec r r-1 r z 0 0010 00rr rrrr 02rr or a,r a vr a z 0 0010 01rr rrrr 02rr or r,a a vr r z 0 0010 10rr rrrr 02rr and a,r a & r a z 0 0010 11rr rrrr 02rr and r,a a & r r z 0 0011 00rr rrrr 03rr xor a,r a r a z 0 0011 01rr rrrr 03rr xor r,a a r r z 0 0011 10rr rrrr 03rr add a,r a + r a z,c,dc 0 0011 11rr rrrr 03rr add r,a a + r r z,c,dc 0 0100 00rr rrrr 04rr mov a,r r a z 0 0100 01rr rrrr 04rr mov r,r r r z 0 0100 10rr rrrr 04rr coma r /r a z
em78p451s 8-bit microcontroller with otp rom 44 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) instruction binary hex mnemonic operation status affected 0 0100 11rr rrrr 04rr com r /r r z 0 0101 00rr rrrr 05rr inca r r+1 a z 0 0101 01rr rrrr 05rr inc r r+1 r z 0 0101 10rr rrrr 05rr djza r r-1 a, skip if zero none 0 0101 11rr rrrr 05rr djz r r-1 r, skip if zero none 0 0110 00rr rrrr 06rr rrca r r(n) a(n-1), r(0) c, c a(7) c 0 0110 01rr rrrr 06rr rrc r r(n) r(n-1), r(0) c, c r(7) c 0 0110 10rr rrrr 06rr rlca r r(n) a(n+1), r(7) c, c a(0) c 0 0110 11rr rrrr 06rr rlc r r(n) r(n+1), r(7) c, c r(0) c 0 0111 00rr rrrr 07rr swapa r r(0-3) a(4-7), r(4-7) a(0-3) none 0 0111 01rr rrrr 07rr swap r r(0-3) ? r(4-7) none 0 0111 10rr rrrr 07rr jza r r+1 a, skip if zero none 0 0111 11rr rrrr 07rr jz r r+1 r, skip if zero none 0 100b bbrr rrrr 0xxx bc r,b 0 r(b) none 0 101b bbrr rrrr 0xxx bs r,b 1 r(b) none 0 110b bbrr rrrr 0xxx jbc r,b if r(b)=0, skip none 0 111b bbrr rrrr 0xxx jbs r,b if r(b)=1, skip none 1 00kk kkkk kkkk 1kkk call k pc+1 [sp], (page, k) pc none 1 01kk kkkk kkkk 1kkk jmp k (page, k) pc none 1 1000 kkkk kkkk 18kk mov a,k k a none 1 1001 kkkk kkkk 19kk or a,k a k a z 1 1010 kkkk kkkk 1akk and a,k a & k a z 1 1011 kkkk kkkk 1bkk xor a,k a k a z 1 1100 kkkk kkkk 1ckk retl k k a, [top of stack] pc none 1 1101 kkkk kkkk 1dkk sub a,k k-a a z,c,dc 1 1110 0000 0010 1e02 int pc+1 [sp], 002h pc none 1 1111 kkkk kkkk 1fkk add a,k k+a a z,c,dc note this instruction is applicable to ioc5 ~ ioc9, iocd~iocf only. this instruction is not recommended for rf operation. this instruction cannot operate on r3f.
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 45 (this specification is subject to change without further notice) 4.12 timing diagrams reset timing (clk="0") clk /reset nop instruction 1 executed tdrh tcc input timing (clks="0") clk tcc ttcc tins ac testing : input is driven at 2.4v for logic "1",and 0.4v for logic "0".timing measurements are made at 2.0v for logic "1",and 0.8v for logic "0". ac test input/output waveform 2.4 0.4 2.0 0.8 test points 2.0 0.8
em78p451s 8-bit microcontroller with otp rom 46 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 5 absolute maximum rating items rating temperature under bias 0 c to 70 c storage temperature -65 c to 150 c input voltage -0.3v to +6.0v output voltage -0.3v to +6.0v operating frequency (2clk) dc to 20mhz 6 electrical characteristics 6.1 dc characteristic (ta=25 c, vdd=5v 5%, vss=0v) symbol parameter condition min typ max unit xtal vdd to 2.3v dc 4 xtal vdd to 3v dc 8 fxt xtal vdd to 5v two clocks dc 20 mhz rc vdd to 2.3v dc 4 rc vdd to 3v dc 4 frc rc vdd to 5v two clocks dc 4 mhz iil input leakage current vin = vdd, vss 1 a vih1 input high voltage vdd=5v) 2.0 v vil1 input low voltage (vdd=5v) 0.8 v vihx1 clock input high voltage (vdd=5v) osci 2.5 v vilx1 clock input low voltage (vdd=5v) osci 1.0 v viht1 input high threshold voltage (schmitt trigger) p70/reset pin 2.0 v vilt1 input low threshold voltage (schmitt trigger) p70/reset pin 0.8 v vih2 input high voltage(vdd=3v) 1.5 v vil2 input low voltage (vdd=3v) 0.4 v vihx2 clock input high voltage (vdd=3v) osci 1.5 v vilx2 clock input low voltage (vdd=3v) osci 0.6 v voh1 output high voltage (ports 5,6,8, p74~p77, p90~p92,p95~p97,) ioh = -12.0ma 2.4 v s7=1(iocd register bit7), ioh = -9.0ma 2 2.4 voh2 output high voltage (p70~p72) s7=0(iocd register bit7), ioh = -12.0ma 2.4 v
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 47 (this specification is subject to change without further notice) symbol parameter condition min typ max unit voh3 output high voltage (p93/sdo,p94/sck) ioh = -12.0ma 2.4 v vol1 output low voltage (ports 5,6,8, p74~p77, p90~p92,p95~p97)) iol =12.0ma 0.4 v s7=1(iocd register bit7), ioh = 9.0ma 0.4 0.8 vol2 output low voltage (p70~p72) s7=0(iocd register bit7), ioh = 12.0ma 0.4 v vol3 output low voltage (p93/sdo, p94/sck) iol = 12.0ma 0.4 v vol4 output low voltage (p74~p77) iol = 15.0ma 0.4 iph pull-high current pull-high active, input pin at vss -50 -100 -240 a iph2 pull-high current (p74,p75) pull-high active, input pin at vss 1 ma iph3 pull high current (p70/reset) pull-high active, input pin at vss -16 -22 -29 a isb power down current all input and i/o pin at vdd, output pin floating, wdt enabled 10 a icc operating supply current /reset="high", fosc=1.84324mhz (ck2="0"), output pin floating 3 ma 6.2 ac characteristic (ta=0 c~70 c, vdd=5v 5%, vss=0v) symbol parameter conditions min typ max unit dclk input clk duty cycle 45 50 55 % tins instruction cycle time (ck2="0") rc type 500 dc ns ttcc tcc input period (tins+20)/n* ns twdt watchdog timer period ta=25 c 18 ms tdrh device reset hold period ta=25 c 183 ms n= selected prescaler ratio. 3 note: vdd = 5v, set up time period = 16.2ms 30% vdd = 3v, set up time period = 18.0ms 30%
em78p451s 8-bit microcontroller with otp rom 48 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 7 application circuit em78p451s
em78p451s 8-bit microcontroller with otp rom product specification (v1.0) 06.01.2004 ? 49 (this specification is subject to change without further notice) appendix a package types otp mcu package type pin count package size EM78P451SP dip 40 600 mil em78p451swm sop 40 450 mil em78p451saq qfp 44 b package information 40-lead plastic dual in line (pdip) { 600 mil
em78p451s 8-bit microcontroller with otp rom 50 ? product specification (v1.0) 06.01.2004 (this specification is subject to change without further notice) 44--lead quad flat package (qfp)


▲Up To Search▲   

 
Price & Availability of EM78P451SP

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X